using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using SharpMud.MudLib.Common.Environment;
using SharpMud.MudLib.Common.Entities.Players;
using SharpMud.Server.Systems.Net.Telnet;
using SharpMud.MudLib.Common.Entities.Players.Session;

namespace SharpMud.MudLib.Common
{
    [XmlRoot("BaseMudLibConfiguration")]
    public class BaseMudLibConfiguration<TAreaInstance, TPlayerCharacterInstance> where TAreaInstance : IArea, new() where TPlayerCharacterInstance : IPlayerCharacter, new()
    {
        private EnvironmentConfiguration<TAreaInstance>                 _EnvironmentManager;
        private TelnetServerConfiguration<TelnetPlayerSession>          _TelnetServer;
        private PlayerManagerConfiguration<TPlayerCharacterInstance>    _PlayerManager;
        private string                                                  _MudName;

        [XmlElement("MudName")]
        public string MudName
        {
            get
            {
                return _MudName;
            }
            set
            {
                _MudName = value;
            }
        }

        [XmlElement("EnvironmentManager")]
        public EnvironmentConfiguration<TAreaInstance> EnvironmentManager
        {
            get
            {
                return _EnvironmentManager;
            }
            set
            {
                _EnvironmentManager = value;
            }
        }

        [XmlElement("TelnetServer")]
        public SharpMud.Server.Systems.Net.Telnet.TelnetServerConfiguration<TelnetPlayerSession> TelnetServer
        {
            get
            {
                return _TelnetServer;
            }
            set
            {
                _TelnetServer = value;
            }
        }

        [XmlElement("PlayerManager")]
        public PlayerManagerConfiguration<TPlayerCharacterInstance> PlayerManager
        {
            get
            {
                return _PlayerManager;
            }
            set
            {
                _PlayerManager = value;
            }
        }

        #region Static Defaulting
        public static BaseMudLibConfiguration<TAreaInstance, TPlayerCharacterInstance> Default
        {
            get
            {
                return null;
            }
        }
        #endregion
    }
}
